// OnionChart.h: interface for the COnionChart class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ONIONCHART_H__D4A17451_A58B_406D_B344_916106B0D326__INCLUDED_)
#define AFX_ONIONCHART_H__D4A17451_A58B_406D_B344_916106B0D326__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Chart.h"

class ftManager;

class COnionChart : public CWnd, public CChart
{
public:
	COnionChart();
	virtual ~COnionChart();

	DECLARE_MESSAGE_MAP()
	afx_msg void OnPaint();

	BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);

public:
	BOOL LoadTree(ftManager*);

private:
	void DrawLevels(Graphics&);
	void DrawLevels(CDC*);

	void DrawSector(Graphics&, UINT, FLOAT, FLOAT);
	UINT m_nlevelboder;
	//
	BOOL GetLevelRect(Rect&, UINT);
	BOOL GetLevelRect(RECT&, UINT);
	BOOL GetLevelFillRect(Rect&, UINT);
	//
	void GetClentsquareRect(RECT*);
	//square area for draw onion
	RECT m_drawrect;
	ftManager* m_pftTree;
};

#endif // !defined(AFX_ONIONCHART_H__D4A17451_A58B_406D_B344_916106B0D326__INCLUDED_)
